import { createRouter, createWebHistory } from 'vue-router'
import detail from "../views/Detail.vue";

// 定义路由组件
const Home = () => import('../views/Home.vue')
const About = () => import('../views/About.vue')
const Login=()=>import('../views/Login.vue')

const Register=()=>import('../views/Register.vue')
const Detail=()=>import('../views/Detail.vue')

const Order=()=>import('../views/Order.vue')
// 定义路由数组
const routes = [
    { path: '/', component: Home },
    { path: '/about', component: About },
    {path:'/login',component: Login},
    {path: '/register',component:Register},
    {name :'Detail',path: '/detail',component:Detail},
    {path:'/order',component:Order}
]

// 创建路由实例
const router = createRouter({
    history: createWebHistory(),
    routes
})



// 导出路由实例
export default router
